package com.im.app.controller;

import org.jim.core.ImChannelContext;
import org.jim.core.ImPacket;
import org.jim.core.http.HttpConfig;
import org.jim.core.http.HttpRequest;
import org.jim.core.http.HttpResponse;
import org.jim.core.packets.Command;
import org.jim.server.command.CommandManager;
import org.jim.server.command.handler.ChatReqHandler;
import org.jim.server.protocol.http.annotation.RequestPath;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping(value = "/api")
public class TestIMController {

    @RequestMapping("/index")
    public String index()throws Exception {

        return "123";
    }


    @RequestMapping("/test")
    public HttpResponse chat(HttpRequest request, HttpConfig httpConfig, ImChannelContext channelContext)throws Exception {
        HttpResponse response = new HttpResponse(request,httpConfig);
        return response;
    }

}
